hw-3 complete (no testing)