Added "ended" method