finished js parser