changed js routing mehtod