fix database querying, adding, removing from the User Interface