modifying theoricus in order to add before/after load data callbacks
merging with origin 2.24p