2nd Commit

sql writing events are done