updated check for is_single