Switched to foreach to save itterate objects
Removed dirty array code because useless