Minimize end-to-end delay through cross-layer optimization in multi-hop wireless sensor networks