file parsing and object creation