a lot of changes
some work on instances