Implemented working version of snake