Impact of contention based MAC on the performance of a wireless sensor network for environmental monitoring