enhanced tests; minor fixes