merged render methods
cleaned code