Add database, create function change output data