added a second way to do it, less descriptive errors but simpler code