Used the wrong function to take first n elements