Implement by python