added a factory method to make it easier when initializing the object