update python script to clear database