save function prototype