Break logic into states