changed data binding to foreach