further making use of polymorphism
fixing missing equal sign in queries
added extra debug in update