Fixed bug! Functionality verified for python3

Python 2 still pending...