Implement second part of Fall 2014 HW 4