first shot at the resub script