added more flags support