graph kind of works, testing needed
graph optimized and working pretty well