Added record functionality