add read and write functionality and initial parsing stuff