parsing in JavaScript works mostly