initialize webpage function