adaptable function without addRule