implement binary storage in textfiles