Adding :first and :last functionality