refactor and snake move