tested and fixed sweep and simAll