slightly modified part e