added more functions from language.c