Added read and write functionality. Now for locking.