added the functionality to check for the pilot mode