add cost of function 
add view