[DF-1039] Used one function instead of copy-paste