added typedefs support