updated render function, doc'ed setup ui function