Used factory to solve Issue1 in README