changed views to access database instead of dummy dicts