fixed error
added units management