correct page offset
use JAI
cleanup