added corner cases