read and write

Signed-off-by: Martin Stensgård <mastensg@ping.uio.no>