frontend work of first two pages