refactored and corrected subway