factory method for other constructor