in reply to Random Change for a Dollar

I think you did mean $dollar in all those places, where you have a 100. Actually, I am surprised that warnings didn't warn you about having a variable used in only one place. :)

Leonid Mamtchenkov aka TVSET