adds selectFirst and selectLast