added typedef support