added some code from algo2 class and data structure problems