         if success {
             do {
                 // create a URL out of the active memory URL + m4a extension
-                let audioMemoryURL = activeMemory.appendingPathComponent("m4a")
+                let audioMemoryURL = activeMemory.appendingPathExtension("m4a")
                 let fm = FileManager.default
                 
                 // delete existing recordings

    }
    
    
    // MARK: - Memory URL Helper Methods
    
    func imageURL(for memory: URL) -> URL {

    var audioRecorder: AVAudioRecorder?
    // the URL of the file used to record to
    var recordingURL: URL!
    // an audio player for playback
    var audioPlayer: AVAudioPlayer?
    
    
    // MARK: - View Lifecycle
