now working with hdb write-down