made surface work for arrays of real values