corrections to update function and a few more implementations...