minor changes to code, added iypthon notebook