try to annotate some functions in core. doesn't check yet due to incomplete checker