added tests for corner cases