fixed update routine, added helper_functions