add header block, and separate out picture load function