I have added ConnectionFactory, a singleton to connect the database