added trim to attr