base version with header footer and content logic