separate RW.hs to RW.hs and Chunks.hs