updated js iterated client with an attribute to write samples to chain. bug fixes