re-factor boids library part one