Bringing code from Z. Koldovsky and P. Tichavsky