started implementing Fdscan algorithm