add try
change error behavior of len