improved surface calculation