fix the declaration of functions