code style optimization
code style optimization
recursive solution