fixed the ending