added scaled output, options for max data range