changed is.real to is.double