new function get_stat/4
remove unused macro