second ending working