Thrashing scenario coding is done

- Should be debugged.