clean for processAttributes method