phase 1, logic (text output)