added victory check and better shell and ui speration