Updated load_data to have cleaner code