logic changed