changed render func