Changed logic statements