added new functions for before and after the snap function