selectBoids function added