added effect for leaving page