updating paths to js, adding check for hash