intersects checking and reverse prohibition were added
snake control was modified