Refactor specials string calculation