updated scan detector

i think this is how you use snprintf?