algorithm update - intermediate