implement recording feature