custom version to work with salt