render function no longer defined twice