parse the flags