adding while loops