finish reordering functions
fix the bhanat function