Change logic to match implemented logic