updated to have config and programatic configuration