working on database class