remove bug in add and remove sentinel function