CLSN-1798 : step 8 of 8 : refactoring code