make it torch-pkg compatible