edits and new code for snake