make implementation in Python