PIM-3323: moved function