improved data handling and added row types