fixed declaration of function