improved data handling