recording functionality working