adapted Joe Bell's dataCzar for my use