added cases for removing from memory Q