take first n elements