element retrieval behaviour change

Now elements are retrieved only once at the beginning of the processing