Add mapE and when