ported calc6 to x3