Genetic centralized dynamic clustering in wireless sensor networks