build node and graph models for assignment 4