modified the after block for new hooks