implement snap to center in model