Not sure if this code would be replaced by an alternate listing method, but you can check for nil with `attempt.index("/")` directly. Also, for ruby you want `&&` instead of and most times.