implemeting dynamic function call