refactored the code to use passenger naming