adds invalid test in type method and adds badSide and badSideRatio methods to make invalid method clearer