Anomaly Detection in Wireless Sensor Networks