Modified original utility to include multi app support