TUP-4 Implementation for maim