custom logic for HGM