templatize Flowlog program for IOS