add util classes in order to construct a new graph more conviently