use strlen instead of empty