refactoring, cleaner code