Added read and write methods from a former project