updated choice of first page in JS