separate zero check command and much cleaner code separation