extraction of html snapshot into a separate module