Adding seg scan, not totaly working yet