made toggle rule ui performence improvment