extracted variable from a magic number
reorg to be more consistent with rw.c