#5 partial solution