modify it to be fit the rectangular data