myqueries save function