updated helper.js file from h5bp