but I need the $ext with the "." at the foreach above