Updated to reflect this has been written for Python3