added transactions support, added indexes