improved formattnig ror genref popups