Improve add implementation and test the changes