database module work in progress