improved 4th homework