begin flag execution code