finished Assignment 2b