Hierarchical smart routing protocol for wireless sensor networks