working on js client