add score_and_print function implementation
add count pairs and flushes
flush printing fix