small refactoring on instrumetation