updated js file parsing