more edgecase handling
more edgecase checks