refactor detail page to utilize record class