added in generic graphing functions to make more modular