first part of refactoring SnakeCage completed