modified hierGraph