Feature/fixing python3 compatibility

Should now work on python2 and python3