modificated diagram2cell