agent positioning improved
fixed WS algorythm, thredding added