db implemantaion (not working)