refactor and test feature probability