added afterTransition as well, since this is more useful