efficiently avoiding the rain