added foeach loop