added working sort, but add not working