new javascript file and added second param graph