If fNdata a double?  Should that the (T)fNdata to avoid compiler warnings?