Added inserts and queries