using lastIndexWhere