implemented add(int) method