refactoring hmarshaller