added mt_rand, setStartPosition asnd setStartDirection functions