Program can now handle pipes of any size.