add NDEBUG and delete useless code