Works for now

seems to work with arguments, update function is now OK (still possible to be split).

May be optimized but seems pointless.