Added the code that writes to offsets to ZK