first stage data parsing