sajad torkamani

First, solve the problem. Then refactor. Combining the two will overwhelm your brain.