like missing NULL check or exception safety. also as a cleanup got rid of unnecessary reinterpret_cast.