graphs rendered, code needs to be dryed, helper refactored