some scripts to save the double