cahnge while loop with foreach