moved graphs to template