G40,41,42 rewriten