clean up database display logic