cahnge while loop with foreach
Merge pull request #17 from acidvertigo/patch-17

change while loop with foreach