Separated the code into 2 steps.