added helper to generate a random number between two values
fixed Math.random call
register random helper