clean up divider logic

indexOf should always be > -1 because the element is a result of matching in the string you are searching