Changed the structure to call the view fct only when all data is received.