Finished random initiation code