refactoring to slim