demo version 2.0

add single page display and optimize th algorithm