add link to page lists
refactor
add sql tag, fix indentation