deprecate toplevel functions for #358