Added function to get subject wise data