prototype of class adding function