fix number of functions