first step of refactoring intent flow