merge all updates into single function