add key class digram