added some edge cases