added parse code to appdelegate.m