add implementation of subtract()