a simple program of detection