commiting to sql properly