adapting boolean expressions