Added _got_to_end() function