check for both variables