add diagram controller