routing and refactor for personalities
refactored routing, added logic for threshold, added filter for valid routing