only call one callback per line, dependant on state