tidied process.py