moved updating code to update.py