making use of a generic function to product html output