typecheck statements complete