implemented the add operation