added ref counter decrementation