reimplement volume writing