added bool statements for firm zero nonzero return