adding sql file, and fixing transactions