worked on database wrapper