adding some functionality required by datagrid
fixing some failing unittests, adding some functionality needed by datagrid