Added a seperate module for db management