implement subscriber pattern