Passing reference to handles instead