can use external js and css, small refactoring