implemented reading/writing ratios. small ratios are stored inline, large ones are boxed