prepping save function