separate out data parsing from init