'lapply.ds' amended.