updated demo and srouce to allow different static page size