surf detection example