added more tests for edge conditions.