inching forward -- factoring out unit states calculation