add factory method implementation