added rule loading and subscription loop