replaced handle with pointer to handle