added graph init functions