fixed the end