XRF code from Artem, R3ABM