improved pull_handles.py