improvements on data parsing