fixed the fourth query