better end case