wrote function for parsing config file