changed range of doubles from [0,1] to [-1,1]