changed renderUser to a dynamic loop