remove cast, make public typedef