working version...need charts
refined