thrashing scenario coding is done except parsing input parameters