added HTML generation for lists