serve only html
refactoring