added a read/write function on new counter page as a test