updating the Main js file with the complete callback