receive database instance as parameter