add examples on function pointer