new db function to get list of profiles