adding function