added sqlite commits; fixing bugs