move Either in separate helper file