random number generator written by me