update unit attributes