adding database content to view and controller