todo update
fixed bug in inserts