merging stations and lines