added init arguments and did some PEP8 tweaks