DB config and grabing data from db