moved __init__ to top of def
added links