fhm refactoring