fix add implementation