modified page.cpp init