add function definitions