graphs working properly