removed unit from function