better use c++ style cast instead of c style cast