database module was modularized to receive a callback function