adds return statement to gexpr