sofia preprocessing