DDF-495 removed some duplicate code