enh: refactor for consistent model
bug: pandas and function mismatch