Added another python implementation