fix database class for inserts
merge