testing writing and reading