working through the 2nd half of lab2