Design of a High Dynamic Range CMOS Variable Gain Amplifier for Wireless Sensor Networks