refactor recorder