simpler render function