resolved issue with row popping function