debugging and extending scan