Added algorithm g as a version of e