preprocessing work