added memory marking