finalize build