added onSnap