added test cases and read from file