modified parsing in js