adding method return type checking
fixing lambda inferred method types