updates and fixes to INSERT and UPDATE queries, added wages support