better hl function for in case of more flags