unnecessary if loop