completely refactored units. now it works.