writing logic page