added writing and reading params