Type rule and tests done