updated unit validation