clarified errors
attempted cleanup, still loops twice for no clear reason
typo