switched to using pandas