added comments to remove function