Fixed package error and added test cases to problem 6