major fixes related to a new structure