formatted; reworked and simplified test