convert compass functions to use Pandas