class diagram with functions