implementing diagram check