Unit 2:hw2, + reorginizing code