move functions to independent modules
write html for items specified