updated layout, refactoring