Implementation of SVfit