improve first-of-type, last-of-type, nth-of-type, nth-last-of-type pseudo selectors