refactor mappings, optimize random forest