more corner cases handled