Modify add() method