added before and after render callbacks to intializer