Refactor to cover more edge cases
:white_check_mark: Update tests