set database from input as well