use len istead of empty string