design snap function