both +ve and -ve test cases working!