An Algorithm for Target Tracking in Mobile Sensor Networks