modified hr.js