main for unit tests corrected to return an accurate status