implemented low-level read/write methods