unit tests added, expand and shrink algorithm improved
algorithm improvements