before solution refactor