added frandom number gen