pre recursive && iterative