added global best and update velocity