begin overhauling raw file input and output