update data sent to js