allow configuration from a dict