working on reading samples from iterated chain using javascript client. There are still bugs.