added block marking and scanning