moved event rendering to partial