fix the 'e' template and add a set of test cases for it