You can get it done using *List* in far effective way. Nonetheless it is fine and job done.