fixed bug in add() function
removed using namespace