edit factory method