refactor factory interface and its basic implementation in order to
increase reusability