removed old js funciton