addCustomAction iteration function