finally i learned how to use recursion, thank you