bonus fixed
added tests up until type checking