add more flags, and clean