Added overload of wait