fixed add/remove functions