Federal grant will help agencies rehab foreclosed properties