Change condition to where scope