Added function to set the data of a block