move __init__ to top of class