refactored html output