Adds the "end" method