added functionality to expand rows