updating code that runs pygame