rewrote flags for nicer syntax and AND operator