refactoring and cleaning up code a bit