use facade and factory pattern