Extracted read/write methods into static functions