Added more test cases, fixed bracket mistake, fixed wrong sign mistake