Added writeToNBT()