updated dynamic function skeleton