rest of hw 4 - completed