added lots of changes to init.py