refactored cond statements, also after reading wikipedia, I nailed the pascal law accidentally haha!