first AC algorithms