fix prototype of function