corrected the logic to make sure expansion only happens in the bounding box between the source and sink, added profiling code (found out that sympy Interval has a very high runtime overhead)