added comments, implemented new wandering algo, modified flocking algo