set up parameter of callback in one function