finish the ReadPage, WritePage and appendPage function