Added implementation in GAP.