more refactoring of hexloginform