object passing to funcion