updated databaseinput tool to use new functions