added test file and minor changes