added a pause on mismatches and cleaned up