refactor $customRenderMethod