parse config and data;