Implemented two fucntion that enable extension to get and write data into database