SMS: Principles of bacterial detection