some styling and refactoring, everything is working