work on pivot
fix bug
remove special test case
fix stuff