define executor function