added builtin rand function

Signed-off-by: Alexander Skjolden <alex@plastboks.net>