a much nicer sol'n