full algoritam
ids algoritam