wrapped fucntion in function