Fixed calculations and renamed "and" to "or"