Added ending conditions