models adapted to changes, minor bug fixing