r3 instance and make __main__ part work again