VID-1936 avoid duplicate code
VID-1936 removed unneeded pass by reference modifiers