added js router functions