Made a class for the writing and reading elements