generate section functions dynamically