some algorithms with python3