added a test for correctness using given text file