Add read/write functions.