added another post-transition function to run before rendering html