Working (but very slow) version with DataGrid