finalisation

read/write ok
tests ok