fixes homework #10