using list when there is more than one error
a bit of clean up