move inside of if