added back the corner cases