added good pivoting to data