add function method