refactor unit and create Position attribute