add user-defined functions