Dehydration algorithm added