Added data processing at beginning