fix for 'explicit use of 'in' operator is deprecated'