Added very hard unit test, realized still a few weird cases my code needs to handle