first working version of markerdetection with prefetching