working version of Dec 8.
Mar 12th commit version
while performance debugging
performance improved by containIndex function
performance improved with vector for allocated memory