snake refactor fix