removed casting away typedefs