updated static factory method