update helper function