added CheckFlags() method to models.