Added pre-processing for data
Got code running on real data