add database connection and sort information from database