Improve data pre-process