add factory method with inheritance