finalizing device structure