make snapshot function