add some functions for Generalized Erlang