move all external function calls to 'update()' method