bug fixes, optimization, add Order to Where.