improve implementation of the collect resource action