added debug code to __init__