select writing to page correctly