minor fixes; added test file