now handles situations if path has < 2 characters