organize beget into reader and writer classes