1. code refactored for highlight rows
2. added clear logic on next row select