added sql class and locking and started update operations