refactoring! :)