fix second prompt is incomplete
rewrite for clarity
rewrite for clarity, logging