replace block.writeData with jsPsych.data.write