record comprehension implementation cleaned