refactor and added more cases
refactor. so much better :wolf: