code from pycharm