added some functionality for the graphics