start of the pivot api