working script before bitcoin update