small changes for read and write, position test