have functions for switching graphs