add random write functionality