typecheck: work on mutability
typecheck: in the middle