improved data parsing