updated for new pandas