update function call, bug fixes