better instance handling