removed append and insert, replaced with add since sorting is completed after adding anyway