improve and stabilize speed by dirty bit manipulation