Changed how instances is created