Updated code (data parsing complete)