implemented add method