added pivoting