move class into __init__