changed def of logic