Added cyclic read and write functions