implementing resource control mechanism, todo: resource delete method