optimizing with pipe instead of matho floor