Adding recording functionality.