find_end and tests