refactored radix learn