Final version of subway program