added commit function, split up execute_query function, removed some extraneuos code
set autocommit equal to false to engage batch commiting