udpate code for typedef