added error and changed remove to not shrink