testing add sorted function