refactor record view