returns proper exit code now