added go implementation
bring back the python version