Intermediate commit

changed signature of _items
some bugs fixed