update to handle system !=0