add code for __init and __exit in shady