obtain data from db and display it