added ID, errorhandling for nans, numbins option for binning