generate new diagram