Research of routing algorithm based on levels for wireless sensor networks