add rec2array and rec_stack